<template>
	<view>
		<!-- 企业信息 -->
		<scrool-list :queryList="queryList" :formData="formData" #default="{ item }">
			<!-- 基本信息 -->
			<view class="list_item" @click="itemClick(item)">
				<view class="item_top">
					<view class="view_pai">
						<u-image :src="src1" width="10px" height="12px" style="margin-right: 5px;"></u-image>
						<text class="text_pai">{{item.archiveName}}</text>
					</view>
				</view>

				<view style="height: 1px;background-color: #ccc;"></view>
				<view class="item_bottom">
					<view class="bottom_text">
						<view class="text_left">所属行政区划</view>
						<view class="text_right">{{item.areaName}}</view>
					</view>
					<view class="bottom_text">
						<view class="text_left">评估等级</view>
						<view class="text_right1">{{item.levels}}</view>
						<image class="stars" src="/static/img/stars.png"></image>
					</view>

					<view class="bottom_text">
						<view class="text_left">评估得分</view>
						<view class="text_right">{{item.score}}</view>
					</view>
					<view class="bottom_text">
						<view class="text_left">评估期</view>
						<view class="text_right">{{item.evalSection}}</view>
					</view>
				</view>
			</view>
		</scrool-list>
	</view>
</template>

<script>
	import {
		assResultDetail
	} from '@/common/api/req.js'
	import scroolList from "./components/scroll-list.vue"
	export default {
		components: {
			scroolList
		},
		data() {
			return {
				src1: "/static/index/tj_icon.png",
				queryList: assResultDetail,
				formData: {
					resultId: '',
					evalSection:'',
				}
			};
		},
		onLoad(option) {
			let param = JSON.parse(option.item);
			this.formData.resultId = param.id;
			this.formData.evalSection = param.evalSection;
			uni.setNavigationBarTitle({
				title: param.areaName
			});
		},
		methods: {
			itemClick(item) {
				this.$goBack('../msgQuery/score_details?data=' + encodeURIComponent(JSON.stringify(item)), 2);
			}

		}
	}
</script>

<style lang="scss">
	page {
		background-color: #EFEFEF;
	}

	.topview {
		padding: 10px 15px;
		background-color: #fff;
		position: sticky;
		z-index: 999;
		top: 0;


		.u-search__content {
			padding: 5px 10px;
		}
	}



	.list_item {
		border-radius: 10px;
		background-color: #FFFFFF;
		margin: 10px;
		padding-bottom: 5px;



		.item_top {
			display: flex;
			justify-content: space-between;
			height: 80rpx;
			border-radius: 10rpx;

			.view_pai {
				padding-left: 30rpx;
				height: 40rpx;
				margin-top: 30rpx;
				display: flex;
				align-items: center;

				.text_pai {
					font-size: 28rpx;
					font-weight: 700;
				}
			}

			.view_state {
				height: 50rpx;
				border-top-right-radius: 10rpx;
				border-bottom-left-radius: 8rpx;
				padding-left: 5rpx;
				padding-right: 5rpx;
				background-color: #666666;
				display: flex;
				align-items: center;

				.text_state {
					font-size: 28rpx;
					font-weight: 700;
				}
			}

		}

		.item_line {
			height: 1rpx;
			background-color: #F2F2F2;
			margin-left: 35rpx;
			margin-right: 35rpx;
		}

		.item_center {
			display: flex;
			flex-direction: column;
			padding-left: 35rpx;
			padding-top: 20rpx;
			padding-bottom: 10rpx;

			.center_top {
				display: flex;
				height: 50rpx;
				align-items: center;

				.view_jia {
					width: 45rpx;
					height: 45rpx;
					background-color: #4CAF50;
					border-radius: 45rpx;
					display: flex;
					justify-content: center;
					align-items: center;

					text {
						color: #FFFFFF;
						font-size: 20rpx;
						font-weight: 700;
					}
				}

				.view_ya {
					width: 45rpx;
					height: 45rpx;
					background-color: #2196F3;
					border-radius: 45rpx;
					display: flex;
					justify-content: center;
					align-items: center;

					text {
						color: #FFFFFF;
						font-size: 20rpx;
						font-weight: 700;
					}
				}

				.text_name {
					margin-left: 20rpx;
					font-size: 28rpx;
					font-weight: 700;
				}

				.text_phone {
					margin-left: 30rpx;
					font-size: 28rpx;
					font-weight: 700;
					color: #666666;
				}
			}

			.center_line {
				margin-left: 22rpx;
				height: 15rpx;
				width: 5rpx;
				background-color: #000000;
			}

		}

		.item_bottom {
			display: flex;
			flex-direction: column;
			padding-left: 35rpx;
			padding-top: 10px;

			.bottom_text {
				display: flex;
				align-items: center;
				padding-top: 10rpx;
				padding-bottom: 10rpx;

				.text_left {
					font-size: 30rpx;
					color: #666666;
					width: 120px;
				}

				.stars {
					width: 30rpx;
					height: 30rpx;
					margin-left: 20rpx;
				}

				.text_right1 {
					// flex: 1;
					font-size: 30rpx;
					display: inline-block;
					white-space: nowrap;
					overflow: hidden;
					text-overflow: ellipsis;
				}

				.text_right {
					flex: 1;
					font-size: 30rpx;
					display: inline-block;
					white-space: nowrap;
					overflow: hidden;
					text-overflow: ellipsis;
				}

				.progress_view {
					flex: 1;
					display: flex;
					padding-right: 30rpx;

					text {
						margin: 0 auto;
					}

					.stars_view {
						display: flex;
						justify-content: center;
						flex-direction: column;
						margin-left: 1rpx;
						margin-right: 1rpx;

						.stars_line1 {
							background-color: #178FFD;
							height: 5rpx;
							width: 100%;
						}

						.stars_line2 {
							background-color: #DB972D;
							height: 5rpx;
							width: 100%;
						}

						.stars_line3 {
							background-color: #25C9B1;
							height: 5rpx;
							width: 100%;
						}
					}
				}

			}
		}
	}


	.view_name {
		// width: calc(100% - 40px);
		height: 90px;
		display: flex;
		padding: 10px;
		background-color: #fff;
		margin: 10px 20px;
		border-radius: 10px;

		.left_name {
			flex: 2;
			background-color: aqua;
			display: flex;
			align-items: center;

			text {
				color: #1590EF;
				font-size: 20px;
				margin-left: 15px;
			}
		}

		.right_code {
			flex: 1;
			background-color: aquamarine;
		}

	}
</style>
